//
//  SEHospitalizeLocationChildCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/2.
//

import UIKit

class SEHospitalizeLocationChildCell: UITableViewCell {
    
    private var viewModel: SEHospitalizeViewModel?
    
    override func setHighlighted(_ highlighted: Bool, animated: Bool) {
        super.setHighlighted(highlighted, animated: animated)
        containerView.backgroundColor = highlighted ? Asset.main.color.withAlphaComponent(0.15) : Asset.white.color
    }
    
    func update(with model: SEHospitalListItem, lineHidden: Bool) {
        splitLine.isHidden = lineHidden
        titleLabel.text = model.name
        distanceLabel.text = model.distance
        collectionView.titles = model.itemList
    }
    
    @IBOutlet private weak var containerView: UIView!
    @IBOutlet private weak var splitLine: UIView!
    @IBOutlet private weak var titleLabel: UILabel!
    @IBOutlet private weak var distanceLabel: UILabel!
    @IBOutlet private weak var collectionView: SETagsCollectionView!
    
}
